<template>
  <section class="memberCompany">
    <el-row :span="24" class="action-bar" >
      <el-button type="primary" size="medium" @click="toTask">返回任务列表</el-button>
      
    </el-row>
    <!--列表-->
		<el-table :data="taskMember" highlight-current-row class="el-table-style">
			<el-table-column type="selection" width="55"/>
			<el-table-column type="index" width="60"/>
			<el-table-column prop="realname" label="执行者" width="120"/>
      <el-table-column prop="vip_name" label="会员等级" width="120"/>
			<el-table-column prop="created_at" label="打卡时间" width="180"/>
		</el-table>
		<el-col :span="24" class="footer-bar">
			<div class="page-code">
        <el-pagination
					background
					:page-size="16"
					layout="prev, pager, next"
					:total="totalPage"
					@current-change="pageChange"
						>
				</el-pagination>
      </div>
    </el-col>

  </section>
</template>

<script>
export default {
	data(){
		return {
      taskMember:[],
      dropColumnName:'选择筛选的状态',
      dialogVisible:false,//编辑状态的弹窗
      searchType:'',//筛选的状态
      companyName:'',//搜索的关键字
    companyList:[],//搜索得出的企业信息
    position:'',
    tastId:'',
    totalPage:0,
    page:1
		}
  },
  methods: {
    handleClose(){
      //编辑弹窗关闭前的回调

    },
    async getTaskInfoUserDetail(){
      //获取任务详情
      const res=await this.$api.getTaskInfoUserDetail({
        task_id:this.tastId
      })
      if(res.data.level=='success'){
        this.taskMember=res.data.data.user_task_daka_list;
        this.totalPage=res.data.data.lastPage
      }
    },
    pageChange(e){
			//翻页
			this.page=e;
			this.getTaskInfoUserDetail()
		},
    toEnterprise(){
        //跳转添加企业信息
        this.$router.push('Enterprise')
    },
    toTask(){
      //返回任务列表
      this.$router.push('task')
    }
  },
  mounted() {
      this.tastId=this.$route.params.id;//任务id
      this.getTaskInfoUserDetail();
  },
}
</script>
<style lang='scss' scoped>
  .memberCompany{
    .action-bar{
			background-color: #f2f2f2;
			height: 60px;
            margin: 10px 0px;
            box-sizing: border-box;
			display: flex;
			align-items: center;
			padding-left: 20px;
			.action-bar-input{
				width: 250px;
				margin-right: 14px;
			}
		}
		.el-table-style{
			width: 100%;
			border: 1px solid #f2f2f2;
		}
		.footer-bar{
			display: flex;
			justify-content: space-between;
			align-items: center;
            background: #f2f2f2;
            padding: 8px;
            margin: 10px 0px;
            box-sizing: border-box;
                }
		.dialog-footer{
			text-align: center;
		}
        .tip{
            margin-top:50px;
            span{
                cursor: pointer;
                color:red;
            }
        }
  }
</style>

<style>

	
	.el-pagination.is-background .el-pager li,
	.el-pagination.is-background .btn-prev,
	.el-pagination.is-background .btn-next
	{
		background-color: #fff;
		border: 1px solid #f1f1f1;
		margin: 0;
	}

 .memberCompany .el-dialog__body{overflow: auto;}
</style>
